<!DOCTYPE html>
<html xmlns="">
<head>
    <meta charset="UTF-8">
    <title>${serverName}-查看公司信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${hostUrl}/static/layui/css/layui.css">
    <script type="text/javascript" src="${hostUrl}/static/layui/layui.js"></script>
    <script>
        layui.use('form', function(){
            var form = layui.form;
            //监听提交
            form.on('submit(formDemo)', function(data){
                var $ = layui.$;
                $.ajax({
                    type: 'post',
                    data: $('#companyForm').serialize(),
                    url: '${hostUrl}/company/update',
                    cache:false,
                    dataType:'json',
                    success: function (resp) {
                        layer.msg(resp.msg);
                    }
                })
                // 返回false，则不跳转页面
                return false;
            });
        });
    </script>
</head>
<body >
<!-- 强行添加两行，避免Form太过靠上了 -->
<br/><br/>

<form class="layui-form" id="companyForm">
    <input type="hidden" name="companyId" value="${currentCompany.userId}">
    <div class="layui-form-item">
        <label class="layui-form-label">公司名</label>
        <div class="layui-input-inline ">
            <input type="text" name="companyName" required  class="layui-input layui-disabled" value="${currentCompany.companyName}" >
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公司地址</label>
        <div class="layui-input-inline">
            <input type="text" name="companyAddress"  placeholder="请输入公司地址" autocomplete="off" class="layui-input" value="${currentCompany.companyAddress}" required lay-verify="required">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公司电话</label>
        <div class="layui-input-inline">
            <input type="text" name="companyAddress"  placeholder="请输入公司电话" autocomplete="off" class="layui-input" value="${currentCompany.companyPhone}" required lay-verify="required">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">确定修改</button>
        </div>
    </div>
</form>
</body>
</html>